package com.zl.dao;

import com.zl.domain.Query;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface BaseDao<T> {
    public List<Map<String, Object>> page(Query query);

    public int pageCount(Query query);

    public int insert(T model);

    public List<T> selectByModel(T model);

    public int count(T model);

    public int delete(T model);

    public int update(T model);

    public List<T> findAll(T model);

    public List<T> findAll();

    public int deleteByIds(@Param("ids") List<Integer> ids,
                           @Param("base") T model);

    public int updateByIds(@Param("ids") List<Integer> ids,
                           @Param("base") T model);

    public T findByModel(T model);
}
